package com.megamusic.findshow.common.constant;

public enum PlaceTypeEnum {


//    酒吧 =1 &&酒店=2 && ktv/会所=3 && 轰趴馆=4 &&
//              度假村=5 &&咖啡厅=6 &&餐厅=7 &&
//             别墅=8 &&沙龙=9 &&艺术中心=10 &&酒楼=11 &&
//             剧院=12 &&排练室=13 &&创意空间=14 &&户外场地=15 &&
//               民宿=16 &&

    BAR(1, "酒吧"),
    HOTEL(2, "酒店"),
    KTV(3, "KTV/会所"),
    PARTYHOUSE(4,"轰趴馆"),
    RESORT(5,"度假村"),
    CAFE(6,"咖啡厅"),
    RESTAURANT(7,"餐厅"),
    VILLA(8,"别墅"),
    SALON(9,"沙龙"),
    CENTER(10,"艺术中心"),
    DININGROOM(11,"酒楼"),
    THEATER(12,"剧院"),
    REHEARSALROOM(13,"排练室"),
    CREATIVESPACE(14,"创意空间"),
    OUTDOORVENUE(15,"户外场地"),
    HOMEHOTAL(16,"民宿");


    private Integer index;
    private String name;

    PlaceTypeEnum(Integer index, String name) {
        this.index = index;
        this.name = name;
    }

    public static String getName(Integer index) {
        for (PlaceTypeEnum pt : PlaceTypeEnum.values()) {
            if (pt.getIndex().equals(index)) {
                return pt.name;
            }
        }
        return null;
    }

    public static PlaceTypeEnum getEnum(Integer index) {
        for (PlaceTypeEnum pt : PlaceTypeEnum.values()) {
            if (pt.getIndex().equals(index)) {
                return pt;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

}
